A reassembler must provide a public resource of type 'rsmi'. The public resource contains information about the capabilities of a given reassembler. This information lists the RTP payload types the reassembler can work with. In addition, it provides information about the reassembler's performance characteristics, specifically its speed and ability to recover from lost packets.
If more than one reassembler is available for a given RTP payload type, QuickTime will choose the one with the best performance characteristics, such as speed or ability to deal with packet loss.
The format of the public resource is defined in QTStreamingComponents.r as follows:
type 'rsmi' {
array infoArray {
align long;
longint = $$CountOf(characteristicArray); /* Array size */
array characteristicArray {
hex longinttag;
hex longint value;
};
hex longintpayloadFlags;
/* kRTPPayloadTypeStaticFlag or kRTPPayloadTypeDynamicFlag */
byte payloadID; /* if static payload */
byte = 0;
byte = 0;
byte = 0;
cstring; /* if dynamic payload */
};
#define kRTPPayloadSpeedTag 'sped'/* 0-255, 255 is fastest */
#define kRTPPayloadLossRecoveryTag 'loss'
/* 0-255, 0 can't handle any loss, 128 can handle 50% packet loss */
#define kRTPPayloadTypeStaticFlag 0x00000001
#define kRTPPayloadTypeDynamicFlag 0x00000002
The payload flags field is set to kRTPMPPayloadTypeDynamicFlag if the reassembler handles a dynamic payload type, or kRTPMPPayloadTypeStaticFlag if it handles a static type.
The payload ID field of the 'rsmi' resource is set to the IETF-defined RTP payload value if a static payload type is used.
The C string contains the RTP payload type text for dynamic types.
A declaration in a .r file might look like this:
resource kRTPReassemblerInfoResType (128) {
{
{
kRTPPayloadSpeedTag, 128,
kRTPPayloadLossRecoveryTag, 50
},
kRTPPayloadTypeDynamicFlag, 0, "x-oval"
}
};
This resource indicates that the reassembler is of average speed and that it can handle 50% packet loss while still providing some meaningful data. It handles the dynamic RTP payload type identified by "x-oval".
The speed tag is relative to other reassemblers of the same type. 128 is a reasonable default.
| Previous | Chapter Contents | Chapter Top | Next |